Switch python runtime to CurrentThreadRuntime#7896
Conversation
Merging this PR will not alter performance
|
70b7d99 to
aba4953
Compare
|
I'm not sure we necessarily want to expose session? I was making the decision that in Python land we can just assume a single global instance? Also would you mind adding to the PR description how multi-threading works in the new design? Do users have to have multiple python threads? Or is there a default background pool? Can I start one? |
|
I think one global session is fine as long as we don't support free threaded python. In free threaded model python is more like any other language but also I don't know anyone yet using python 3.14. |
6c3757c to
065e378
Compare
gatesn
left a comment
There was a problem hiding this comment.
I think we should default to core count - 1, and allow the user to adjust from there
Signed-off-by: Robert Kruszewski <github@robertk.io>
Signed-off-by: Robert Kruszewski <github@robertk.io>
065e378 to
5f62613
Compare
We want to unify the language bindings to have the same behaviour when interacting with vortex. This pr brings python bindings in line with C and Java in using CurrentThreadRuntime by default
Vortex uses shared runtime underneath python api. When no background threads are configured the python thread drives the work on the scan. This means multiple Python threads can make progress independently as long as each thread owns the reader it is consuming
Alternatively users who want vortex to work in the background, independently of user level python threads, can configure worker count to desired value.
These examples are added to the docs